<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .parent{
            width:600px;
            height: 600px;
            background-color: red;
            display: flex;
            /* flex-direction:column; */
            /* 设置横坐标方向的 */
            justify-content: center;
            align-items: center;
        }
        .parent div{
            width: 200px;
            height: 200px;
            border: 2px solid #333;
        }
    </style>
</head>
<body>
    <div class="parent">
        <div></div>
    </div>   
</body>
</html>